import React from "react";

export default class RefsAndDOM extends React.Component{
    constructor(){
        super()
        this.HelloDiv=React.createRef();

    }
    render(){
        return(
            <div ref={this.HelloDiv}>
                Hello Div
            </div>
        )
    }

    componentDidMount(){
        console.log(this.HelloDiv.current)
        this.HelloDiv.current.style.color="red";
    }
}